<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		   <form action="" id="searchForm">
                <label>
                    <span></span>
                    <input id="search" type="text" placeholder="搜索"/>
                </label>
            </form>
		<script src="jquery-2.1.4.js"></script>
		<script>
			$('#searchForm').submit(function(){
				
//				存取一个对象
	        	var person = {name:"vanida","sex":"girl","age":259};
	        	localStorage.setItem("person",JSON.stringify(person));
	        	getperson = JSON.parse(localStorage.getItem("person"));
	        	
				 var  arr=['北京','gg','欢乐谷'];
        		localStorage.setItem("arr",JSON.stringify(arr));
        		getarr = JSON.parse(localStorage.getItem("arr"));
    		})
		</script>
	</body>
	
</html>
